-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: feat(gatsby-plugin-fastity): Gatsby v4 DSG & SSR Support #68
Conversation
🦋 Changeset detectedLatest commit: 74c6f35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The issue im #3 above is caused by enabling redirects. Because it tries to register |
I've been assuming the gatsby render methods handle caching for DSG when I don't know if that's actually true. It better be but I should validate. |
… this is working, need more tests)
… into feat/fastify/gatsby-v4 * 'feat/fastify/gatsby-v4' of github.com:gatsby-uc/plugins: Formatting with Prettier
* main: Version Packages (#69) fix(gatsby-plugin-relative-ci): update dependency @relative-ci/agent to v2 (#76) chore(): update dependency lint-staged to v11 (#74) chore(gatsby-plugin-github-ribbon): update jest monorepo to v27 (major) (#75) chore(gatsby-plugin-github-ribbon): update react monorepo to v17 (major) (#73) chore(gatsby-plugin-relative-ci): update non-major updates (#64) chore(gatsby-source-packagist): update non-major updates (#65) fix(gatsby-plugin-ackee-tracker): update non-major updates (#66) chore(gatsby-plugin-github-ribbon): update non-major updates (#63) fix: run tets on bot PR chore(): update non-major updates (#71) chore: upgrade yarn chore(repo): action changes (#72) chore(gatsby-plugin-fastify): update non-major updates (#62) fix(test-site): update non-major updates (#67)
Prerelease available here: https://www.npmjs.com/package/gatsby-plugin-fastify/v/next |
cachingthings to think about. From my discussion with kyle I'm still not sure if Gatsby is caching the HTML/JSON response for DSG routes. I'm guessing the answer is no, but we should confirm. Assuming it's not caching we can implement an in memory cache for these pages. Kyle suggested there would eventually be an API to invalidate routes in caches upon changes in the data layer, we'd use this to burn that source server cache. That cache would need to be able to handle etag/lastUpdate checks and correctly respond. Point is a server side cache could be needed. |
* main: Version Packages (#86) chore(gatsby-plugin-github-ribbon): update non-major dependency versions (#83) chore(gatsby-plugin-fastify): update non-major dependency versions (#82) chore(gatsby-plugin-fastify): Misc cleanup (#85) Update renovate.json Version Packages (#81) chore(gatsby-plugin-fastify): update non-major updates (#77) fix(test-site): update non-major updates (#80)
* main: fix: fix yarn lock fix: remove learnaa config chore: change to changeset publish command from learna. This reducees tooling and supports github releases/changelogs Version Packages (#94) chore(gatsby-plugin-relative-ci): update dependency @babel/core to ^7.15.8 (#89) chore(gatsby-source-packagist): update non-major dependency versions (#90) fix(gatsby-plugin-ackee-tracker): update dependency @babel/core to ^7.15.8 (#91) fix(test-site): update non-major dependency versions (#93) chore(repo): update dependency lint-staged to ^11.2.3 (#92) Version Packages (#88) rewrite(gatsby-plugin-fastify): move frome callbacks to async/await (#87)
I'm looking for a self hosted solution for SSR/DSG and came across this plugin. It seems to address most of my needs, however one thing I need is the ability to proxy unhandled requests to an upstream server. Currently I am using gatsby 3 without ssr/dsg. I build a docker image using nginx. I use a plugin that generates explicit location directives for each index.html file, static file, and gatsby redirects, plus a final wildcard proxy_pass directive to send the remainder of the traffic upstream. In order to switch to this plugin, I would need to make the following changes to this plugin: |
* main: Test/fastify/benchmark (#103)
…nt for ssr/dsg and correct 400 repsonse if html not supported
…ersion requirements, use propper cache variable for dsg/ssr engines
… into feat/fastify/gatsby-v4 * 'feat/fastify/gatsby-v4' of github.com:gatsby-uc/plugins: fix: correct settings
* main: chore(gatsby-plugin-github-ribbon): update non-major dependency versions (#113) chore(gatsby-plugin-relative-ci): update non-major dependency versions to ^7.16.0 (#114) chore(gatsby-source-packagist): update non-major dependency versions to ^7.16.0 (#115) fix(gatsby-plugin-ackee-tracker): update non-major dependency versions to ^7.16.0 (#116) Version Packages (#119) WIP: feat(gatsby-plugin-fastity): Gatsby v4 DSG & SSR Support (#68) chore: fix benchmarks Test/fastify/benchmark (#103) fix(test-site): update non-major dependency versions (#111) chore(repo): update non-major dependency versions (#110) Version Packages (#109) chore(several): v4 compt and ackee tracker fix (#108) Version Packages (#107) fix: not shipping traspiled code on release
Description
This PR will implement DSG + SSR support for Gatsby v4.
Documentation
encodeUri
fastify/fastify-static#234, encoding/decoding uri is confused and misconfigured fastify/fastify#3356, and the lib doesn't handle url-encoded URI properly delvedor/find-my-way#206 (this problem is as deep as a I feared. hopefully we've identified the fix and we just need to get some fixes in place).We need to be able to listen for data changes too. (currently this appears not to be possible, seems with v4 going GA that'll be possible. Let's keep an eye out for those changes. Deferred Static Generation gatsbyjs/gatsby#33218 (reply in thread))Won't be supportedsendFile
command is handling sending th 404. This makes sense. Just need to figure out where this error is coming from. Async handler throws "no undefined" error when used withfastify-static
and sendFile. fastify/fastify#3412Won't be supported__/refresh
endpoint needs to work with and without slash./api
routes 404 if they don't exist with a unique 404 that's not the Gatsby site or DSG.x-gatsby-server
tags. Leave them in always? Add them on certain debug modes? ... Answer: leaving for now. might change later.Status: as soon as I can get tests working and run old tests and write new ones this will ship
Related issues
closes #30